﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.ApplicationModel.Resources;
using Windows.ApplicationModel.Resources.Core;

namespace ShopPowerTemplate.Common
{
    public class ResourcesHelper
    {
        public static string GetString(string resource)
        {
            ResourceManager manager = ResourceManager.Current;

            var value = manager.MainResourceMap.GetSubtree("Resources").GetValue(resource.Replace('.', '/'));

            if(value == null)
                return string.Empty;

            return value.ValueAsString;
        }
    }
}
